'use strict';

function spilt_to_zero(number, interval) {
  let result=new Array();
  let n=number;
  for(let i=number;i>0;){
    if(n>0){
      result.push(n);
      n=(n-interval).toFixed(1);
      n=parseFloat(n);
    }
    else
    break;
  }
  result.push(n);
  return result;
}

module.exports = spilt_to_zero;
